import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useTeacherStore = defineStore ('teacher', () => {
    const info = ref ({})
    const classInfo = ref ({})
    const classCount = ref(0)

    function setInfo ( data ) {
        info.value = data
    }

    const setClass = ( data ) => {
        // console.log (data)
        classInfo.value = data.splice(0,5)
    }
    //三个
    const setCount = (id) =>{
        classCount.value = id
    }
    return { info, setInfo ,setClass,classInfo,setCount,classCount}
})